home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / codeli_1 / setup.exe / _SETUP.1 / frmOpenURL.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-07-21  |  3.9 KB  |  124 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOpenURL 
  3.    Caption         =   "Open a URL into the Default Internet Browser"
  4.    ClientHeight    =   2520
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5370
  8.    Icon            =   "frmOpenURL.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2520
  11.    ScaleWidth      =   5370
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.Label Label3 
  14.       Alignment       =   1  'Right Justify
  15.       AutoSize        =   -1  'True
  16.       Caption         =   "Written for the VB Center Code Library"
  17.       BeginProperty Font 
  18.          Name            =   "Small Fonts"
  19.          Size            =   6.75
  20.          Charset         =   0
  21.          Weight          =   400
  22.          Underline       =   0   'False
  23.          Italic          =   0   'False
  24.          Strikethrough   =   0   'False
  25.       EndProperty
  26.       Height          =   165
  27.       Left            =   2940
  28.       TabIndex        =   3
  29.       Top             =   2040
  30.       Width           =   2355
  31.    End
  32.    Begin VB.Label Label2 
  33.       Alignment       =   1  'Right Justify
  34.       AutoSize        =   -1  'True
  35.       Caption         =   "http://www.geocities.com/SiliconValley/Way/6445"
  36.       BeginProperty Font 
  37.          Name            =   "MS Sans Serif"
  38.          Size            =   8.25
  39.          Charset         =   0
  40.          Weight          =   700
  41.          Underline       =   0   'False
  42.          Italic          =   0   'False
  43.          Strikethrough   =   0   'False
  44.       EndProperty
  45.       ForeColor       =   &H00800000&
  46.       Height          =   195
  47.       Left            =   960
  48.       TabIndex        =   2
  49.       Top             =   2280
  50.       Width           =   4365
  51.    End
  52.    Begin VB.Label Label1 
  53.       Caption         =   "Click the link below to open the URL ""http://www.microsoft.com"" into the Default Internet Browser:"
  54.       Height          =   375
  55.       Left            =   120
  56.       TabIndex        =   1
  57.       Top             =   120
  58.       Width           =   5055
  59.    End
  60.    Begin VB.Label URL 
  61.       AutoSize        =   -1  'True
  62.       Caption         =   "http://www.microsoft.com"
  63.       BeginProperty Font 
  64.          Name            =   "MS Sans Serif"
  65.          Size            =   8.25
  66.          Charset         =   0
  67.          Weight          =   400
  68.          Underline       =   -1  'True
  69.          Italic          =   0   'False
  70.          Strikethrough   =   0   'False
  71.       EndProperty
  72.       ForeColor       =   &H00FF0000&
  73.       Height          =   195
  74.       Left            =   120
  75.       TabIndex        =   0
  76.       Top             =   720
  77.       Width           =   1845
  78.    End
  79. Attribute VB_Name = "frmOpenURL"
  80. Attribute VB_GlobalNameSpace = False
  81. Attribute VB_Creatable = False
  82. Attribute VB_PredeclaredId = True
  83. Attribute VB_Exposed = False
  84. #If Win32 Then
  85. Private Declare Function ShellExecute Lib _
  86. "shell32.dll" Alias "ShellExecuteA" _
  87. (ByVal hwnd As Long, _
  88. ByVal lpOperation As String, _
  89. ByVal lpFile As String, _
  90. ByVal lpParameters As String, _
  91. ByVal lpDirectory As String, _
  92. ByVal nShowCmd As Long) As Long
  93. #Else
  94. Private Declare Function ShellExecute Lib _
  95. "shell.dll" _
  96. (ByVal hwnd As Integer, _
  97. ByVal lpOperation As String, _
  98. ByVal lpFile As String, _
  99. ByVal lpParameters As String, _
  100. ByVal lpDirectory As String, _
  101. ByVal nShowCmd As Integer) As Integer
  102. #End If
  103. Private Const SW_SHOWNORMAL = 1
  104. Private Sub Picture1_Click()
  105. Dim iret As Long
  106. ' open URL into the default internet browser
  107. iret = ShellExecute(Me.hwnd, _
  108. vbNullString, _
  109. "http://www.geocities.com/SiliconValley/Way/6445", _
  110. vbNullString, _
  111. "c:\", _
  112. SW_SHOWNORMAL)
  113. End Sub
  114. Private Sub URL_Click()
  115. Dim iret As Long
  116. ' open URL into the default internet browser
  117. iret = ShellExecute(Me.hwnd, _
  118. vbNullString, _
  119. "http://www.microsoft.com", _
  120. vbNullString, _
  121. "c:\", _
  122. SW_SHOWNORMAL)
  123. End Sub
  124.